From 40bb2e5fead9f092ee6805c73e26d1c2fd54c40f Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 12 Apr 2007 13:21:26 +0100 Subject: [PATCH] HVM: Allow qemu monitor to be configured in domain config file. From: Yongkang You Signed-off-by: Keir Fraser --- tools/examples/xmexample.hvm | 6 ++++++ tools/examples/xmexample.vti | 5 +++++ tools/python/README.XendConfig | 1 + tools/python/README.sxpcfg | 1 + tools/python/xen/xend/XendConfig.py | 2 +- tools/python/xen/xend/image.py | 2 ++ tools/python/xen/xm/create.py | 4 ++++ 7 files changed, 20 insertions(+), 1 deletion(-) diff --git a/tools/examples/xmexample.hvm b/tools/examples/xmexample.hvm index 06662a0d17..c027f0821b 100644 --- a/tools/examples/xmexample.hvm +++ b/tools/examples/xmexample.hvm @@ -169,6 +169,12 @@ stdvga=0 serial='pty' +#----------------------------------------------------------------------------- +# Qemu Monitor, default is disable +# Use ctrl-alt-2 to connect +#monitor=1 + + #----------------------------------------------------------------------------- # enable sound card support, [sb16|es1370|all|..,..], default none #soundhw='sb16' diff --git a/tools/examples/xmexample.vti b/tools/examples/xmexample.vti index a9ff77b4ce..05a7d0866f 100644 --- a/tools/examples/xmexample.vti +++ b/tools/examples/xmexample.vti @@ -112,6 +112,11 @@ stdvga=0 # then xm console or minicom can connect serial='pty' +#----------------------------------------------------------------------------- +# Qemu Monitor, default is disable +# Use ctrl-alt-2 to connect +#monitor=1 + #----------------------------------------------------------------------------- # enable sound card support, [sb16|es1370|all|..,..], default none #soundhw='sb16' diff --git a/tools/python/README.XendConfig b/tools/python/README.XendConfig index 2e677f887a..9776f3307b 100644 --- a/tools/python/README.XendConfig +++ b/tools/python/README.XendConfig @@ -115,6 +115,7 @@ otherConfig image.nographic image.vnc image.sdl + image.monitor image.vncdisplay image.vncunused image.hvm.device_model diff --git a/tools/python/README.sxpcfg b/tools/python/README.sxpcfg index 9beffd6ba0..7a17fd1515 100644 --- a/tools/python/README.sxpcfg +++ b/tools/python/README.sxpcfg @@ -63,6 +63,7 @@ image - fdb - soundhw - localtime + - monitor - serial - stdvga - isa diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index a4a9d43fe5..a85be3fae6 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -117,7 +117,7 @@ LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(XENAPI_CFG_TO_LEGACY_CFG) # Platform configuration keys. XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display', - 'fda', 'fdb', 'keymap', 'isa', 'localtime', + 'fda', 'fdb', 'keymap', 'isa', 'localtime', 'monitor', 'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl', 'soundhw','stdvga', 'usb', 'usbdevice', 'vnc', 'vncconsole', 'vncdisplay', 'vnclisten', diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 8f119b3ae1..a4e785d96a 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -415,6 +415,8 @@ class HVMImageHandler(ImageHandler): else: ret.append('-nographic') + if int(vmConfig['platform'].get('monitor', 0)) != 0: + ret.append('-monitor vc') return ret def createDeviceModel(self, restore = False): diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py index 1411f9be89..e68722cb8c 100644 --- a/tools/python/xen/xm/create.py +++ b/tools/python/xen/xm/create.py @@ -421,6 +421,10 @@ gopts.var('serial', val='FILE', fn=set_value, default='', use="Path to serial or pty or vc") +gopts.var('monitor', val='no|yes', + fn=set_bool, default=0, + use="""Should the device model use monitor?""") + gopts.var('localtime', val='no|yes', fn=set_bool, default=0, use="Is RTC set to localtime?") -- 2.30.2